package Thread.thread;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @author 23050
 * @version 1.0
 * @description: TODO
 * @date 2024/3/2 18:59
 */
public class ThreadJoin {

    public static void main(String[] args) {

        Thread t1 = new Thread(()->{
            System.out.println("t1");
        });

        Thread t2 = new Thread(()->{
            try {
                t1.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("t2");
        });

        Thread t3 = new Thread(()->{
            try {
                t2.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("t3");
        });
        t1.start();
        t2.start();
        t3.start();

        List<Integer> list = new ArrayList<>();
        list.add(1);
        HashMap<String,String> hashMap = new HashMap<>();

    }



}
